{extend name="layout"/}

{block name="breadcrumb"}
<h2>积分记录</h2>
<ol class="breadcrumb">
    <li><a href="{:url('index/index')}">首页</a></li>
    <li><strong>积分记录</strong></li>
</ol>
{/block}

{block name="search"}
{include file='oauth_integral/search'/}
{/block}

{block name="main"}
<div class="ibox float-e-margins">
    <div class="ibox-title">
        <h5>积分记录</h5>
    </div>
    <div class="ibox-content">
        <div class="table-responsive">
            <p>共 {$count} 条数据</p>
            <p>积分总额：<span class="text-danger">{$sum}</span> &nbsp; &nbsp; 积分余额：<span class="text-danger">{$rest}</span></p>
            <table class="table table-striped">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>积分类型</th>
                    <th>课程名称</th>
                    <th>积分数值</th>
                    <th>积分时间</th>
                </tr>
                </thead>
                <tbody>
                {foreach $model as $key=>$vo }
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.type}</td>
                    <td>{$vo.className}</td>
                    <td>{$vo.integral}</td>
                    <td>{$vo.create_time}</td>
                </tr>
                {/foreach}
                </tbody>
            </table>
            {$model|raw}
        </div>

    </div>
</div>
{/block}

<!-- 加载其他js -->
{block name="jsFile"}
{load href="/static/css/plugins/datetimepicker/bootstrap-datetimepicker.min.css" /}
{load href="/static/js/plugins/datetimepicker/bootstrap-datetimepicker.min.js" /}
<script>
    $('.start-time').datetimepicker({
        weekStart: 1, // 一周从哪一天开始。0（星期日）到6（星期六）
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2, // 日期时间选择器打开之后首先显示的视图 0 hour 1 day 2 month 3 year 4 decade
        forceParse: 1, // 当用户在输入框中输入了不正确的日期，选择器将会尽量解析输入的值
        showMeridian: 1
    });
    $('.end-time').datetimepicker({
        weekStart: 1, // 一周从哪一天开始。0（星期日）到6（星期六）
        todayBtn:  1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2, // 日期时间选择器打开之后首先显示的视图 0 hour 1 day 2 month 3 year 4 decade
        forceParse: 1, // 当用户在输入框中输入了不正确的日期，选择器将会尽量解析输入的值
        showMeridian: 1
    });
</script>
{/block}